package com.learning.rpc.sms;

import com.learning.rpc.config.spring.annocation.EnableRpc;
import com.learning.rpc.sms.service.SmsServiceImpl;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.io.IOException;

/**
 * ClassName: SmsServiceApplication
 * Description:
 * Date: 2022/5/10 21:46 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Configuration
@ComponentScan("com.learning.rpc")
@PropertySource("classpath:/rpc.properties")
@EnableRpc
public class SmsServiceApplication {

    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(SmsServiceApplication.class);
        context.start();

//        final SmsServiceImpl smsService = context.getBean(SmsServiceImpl.class);
//        System.out.println(smsService.send("10086", "统一测试一条短信"));

        System.in.read();
        context.close();
    }

}
